//
//  CoreDataHelper.h
//  iFly
//
//  Created by User-10 on 12/10/14.
//  Copyright (c) 2014 TeamDifferent. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <CoreData/CoreData.h>
#import "Player.h"

@interface CoreDataHelper : NSObject

@property (readonly, strong, nonatomic) NSManagedObjectContext *managedObjectContext;
@property (readonly, strong, nonatomic) NSManagedObjectModel *managedObjectModel;
@property (readonly, strong, nonatomic) NSPersistentStoreCoordinator *persistentStoreCoordinator;

- (void)saveContext;
- (NSURL *)applicationDocumentsDirectory;


+(id) sharedCoreDataHelper;

-(void) loadData;
-(NSMutableArray*) getPlayersInDescendingOrder;
+(BOOL) checkMinScore:(NSInteger) score;
-(void) addPlayerWithName:(NSString*) name andScore:(NSNumber*) score;

@end
